Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Jenkins to parse the release Jenkinsfile before cancelling non-release triggers #9571

Closed
wants to merge 1 commit into from

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Jan 6, 2025

This way, we can update parameters/options and have Jenkins take them into account for the next build upon branch indexing or push, even though we don't release on branch indexing or push.

NOTE: This is untested. Depending on how Jenkinsfiles get executed, this may or may not work.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@yrodiere yrodiere requested a review from beikov January 6, 2025 10:34
…release triggers

This way, we can update parameters/options and have Jenkins take them
into account for the next build upon branch indexing or push,
even though we don't release on branch indexing or push.
@yrodiere
Copy link
Member Author

Waiting to see the result on 6.6 before we merge here.

See https://ci.hibernate.org/view/Release/job/hibernate-orm-release/job/6.6/ , build 99. Unfortunately it's being throttled right now, so we'll need to wait until tomorrow before we can see the effect...

@beikov this makes me think the throttle probably doesn't make sense, since it takes into account non-release runs as well... ? And if we don't release on push, it's not really necessary.

@beikov
Copy link
Member

beikov commented Jan 14, 2025

With your changes, the throttle should not be a problem anymore because it wouldn't even show up as build, or will we have to do something like the following for that? https://stackoverflow.com/questions/42798006/how-to-disable-automatic-build-from-scm-change-in-jenkinsfile/72917011#72917011

@yrodiere
Copy link
Member Author

yrodiere commented Jan 14, 2025

With your changes, the throttle should not be a problem anymore because it wouldn't even show up as build

No, with my changes the build would still show up, with NOT_BUILT status. It's just that Jenkins would (hopefully) parse the whole Jenkinsfile and the build's options before cancelling the build.

or will we have to do something like the following for that? https://stackoverflow.com/questions/42798006/how-to-disable-automatic-build-from-scm-change-in-jenkinsfile/72917011#72917011

If you want to disable builds on push, we can simply disable that in the web UI.
But that would mean that Jenkins wouldn't update the job definition on push -- e.g. if we change the cron -- so that doesn't look like something we want?


Back to the problem... the throttle is pointless if we don't build on push, isn't it? Especially if we avoid allocating a node when we cancel the build (NOT_BUILT).

@beikov
Copy link
Member

beikov commented Jan 14, 2025

Back to the problem... the throttle is pointless if we don't build on push, isn't it? Especially if we avoid allocating a node when we cancel the build (NOT_BUILT).

I guess it is, yes.

@yrodiere
Copy link
Member Author

Back to the problem... the throttle is pointless if we don't build on push, isn't it? Especially if we avoid allocating a node when we cancel the build (NOT_BUILT).

I guess it is, yes.

Ha, actually you removed it a while ago: 0c76b02#diff-39361c81949b88c7ae073b50cfbcae6b6d6479d0016dd6ae7d922ccd64952274L69

It's just that Jenkins never had a chance to parse the Jenkinsfile since your commit... Which hopefully my patch will fix.

Bottom line: let's wait for the throttle to expire tomorrow and see what happens on 6.6.

@yrodiere
Copy link
Member Author

... and it did not work, the build ends up running anyway (and failing, for some reason): https://ci.hibernate.org/blue/organizations/jenkins/hibernate-orm-release/detail/6.6/99/pipeline

I'll close this and revert the 6.6 change.

yrodiere added a commit to yrodiere/hibernate-orm that referenced this pull request Jan 15, 2025
yrodiere added a commit that referenced this pull request Jan 15, 2025
…ing non-release triggers"

This reverts commit ffecd7d.

This reverts PR #9617

See #9571 (comment)
@yrodiere yrodiere closed this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants